package ullio.video
{
	import mx.controls.HSlider;
	import mx.events.SliderEvent;	
	import ullio.events.AppEvent;

 	[Event( name="volumeChange", type="AppEvent" )]
 	
	public class VolumeSlider extends HSlider
	{
		public function VolumeSlider()
		{
			super();
			width = 60;
			snapInterval = .1;
			minimum = 0;
			maximum = 1;	
			showDataTip = false;		
			allowTrackClick = true;
			liveDragging = false;
			useHandCursor = true;
			buttonMode = true;	
			addEventListener(SliderEvent.CHANGE, goVolumeChange);			
		}
		
		private function goVolumeChange(event:SliderEvent):void{			
			dispatchEvent(new AppEvent("volumeChange",{volume:event.value}));
		}
		
	}
}